<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns:ui="http://java.sun.com/jsf/facelets"
                template="/publico/template/templatePadrao.xhtml"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:p="http://primefaces.org/ui"
                xmlns:f="http://java.sun.com/jsf/core">

    <ui:define name="content">

        <h:form id="form">

            <p:panel header="Lista de Currículos">
                <p:growl showDetail="true" showSummary="true"/>

                <p:dataTable 
                    id="dtACurriculo"
                    var="acurriculo" value="#{curriculoBean.curriculos}"
                    emptyMessage="Sem registro para a exibição."
                    paginator="true" rows="6"  
                    paginatorTemplate="{FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"  
                    rowsPerPageTemplate="10,15,20">

                    <p:column headerText="Currículo" filterBy="#{acurriculo.nome}" >  
                        <h:outputText value="#{acurriculo.nome}" />  
                    </p:column>  

                    <p:column headerText="Operações">  
                        <div align="center">
                            <p:commandButton 
                                ajax="false"
                                value="Avaliar"
                                action="#{avaliacaoBean.pagListarAvaliar()}" >
                                <f:setPropertyActionListener 
                                    value="#{acurriculo}"
                                    target="#{avaliacaoBean.curriculo}"/>
                            </p:commandButton>  
                            <p:commandButton 
                                ajax="false"
                                value="Avaliado"
                                action="#{avaliacaoBean.pagListarAvaliado()}" >
                                <f:setPropertyActionListener
                                    value="#{acurriculo}"
                                    target="#{avaliacaoBean.curriculo}"/>
                            </p:commandButton>  
                        </div>
                    </p:column> 
                </p:dataTable>
            </p:panel>
        </h:form>
    </ui:define>
</ui:composition>